package com.tanhua.admin.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @ClassName AdminUser
 * @Description TODO AdminUser
 * @Author JavaDev
 * @Date 2020/12/28 4:03
 * @Version 1.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AdminUser implements Serializable {

    private static final long serialVersionUID = -5218915413928652056L;

    /**
     * 用户ID
     */
    @TableId
    private Long uid;

    /**
     * 密码，JSON序列化时忽略
     */
    @JsonIgnore
    private String password;

    /**
     * 账号
     */
    private String username;

    /**
     * 用户名
     */
    private String name;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 自我介绍
     */
    private String introduction;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 手机
     */
    private String phone;


    /**
     * 权限
     */
    private String rolesStr;

    /**
     * 权限列表
     */
    @TableField(exist = false)
    private String[] roles;

}